package com.mtt.erp.goods.service;

import com.mtt.erp.common.domain.QueryRequest;
import com.mtt.erp.goods.domain.TCategory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mtt.erp.goods.dto.TCategoryCreateDto;
import com.mtt.erp.goods.dto.TCategoryDto;
import com.mtt.erp.goods.dto.TCategoryUpdateDto;
import com.mtt.erp.goods.vo.TCategoryTreeVo;
import com.mtt.erp.goods.vo.TCategoryVo;

import java.util.List;

/**
 * @Description: 分类表Service
 * @Author: guomengzhou
 * @CreateDate: 2019/6/4$ 14:25$
 * @Version: 1.0
 */
public interface ITCategoryService extends IService<TCategory> {
    /**
     * 获取树状类型Map
     * @param request
     * @param tCategoryDto
     * @return
     */
    TCategoryTreeVo findCategory(QueryRequest request, TCategoryDto tCategoryDto);

    /**
     * 获取类型列表
     * @param tCategoryDto
     * @param request
     * @return
     */
    List<TCategory> findCategory(TCategoryDto tCategoryDto,QueryRequest request);

    /**
     * 新增类别
     * @param tCategoryCreateDto
     */
    void createCategory(TCategoryCreateDto tCategoryCreateDto);

    /**
     * 修改类别
     * @param tCategoryUpdateDto
     */
    void updateCategory(TCategoryUpdateDto tCategoryUpdateDto);

    /**
     * 递归删除类别
     * @param categoryIds
     * @throws Exception
     */
    void deleteCategory(String[] categoryIds) throws Exception;

    /**
     * 通过id查询
     */
    TCategoryVo findCategoryById(String id);

}
